<?php 
defined('IN_SITE') or exit('Access Denied');
get_header();

?>
<body>
<?=$menu?>
<form name="search" method="get" action="">
<input type="hidden" name="module" value="<?=$module?>"> 
<input type="hidden" name="action" value="<?=$action?>"> 
<input type="hidden" name="catid" value="<?=$catid?>">
<table cellpadding="0" cellspacing="1" class="table_form">
  <caption>信息查询</caption>
<tr>
<td>

标题：<input type="hidden" name="field" value="title">
<input type="text" name="q" value="<?=$q?>" size="20" />&nbsp;
发布时间：<?=form::date('inputdate_start')?> - <?=form::date('inputdate_end')?>&nbsp;
<input type="submit" name="dosubmit" value=" 查询 " />
</td>
</tr>
</table>
</form>
<form name="myform" method="post" action="">
<table cellpadding="0" cellspacing="1" class="table_list">
  <caption>信息管理</caption>
<tr>
<th width="30">选中</th>
<th width="50">排序</th>
<th width="40">ID</th>
<th width="227">标题</th>
<!--<th width="52">点击量</th>-->
<th width="61">发布人</th>
<th width="100">更新时间</th>
<th width="82">管理操作</th>
</tr>
<?php 
if(is_array($infos)){
	foreach($infos as $info){
		//$r = $c->get_count($info['contentid']);
		//dump($info);
?>
<tr>
<td><input type="checkbox" name="contentid[]" value="<?=$info['contentid']?>" id="content_<?=$info['contentid']?>" /></td>
<td><input type="text" name="listorders[<?=$info['contentid']?>]" value="<?=$info['listorder']?>" size="4" /></td>
<td><?=$info['contentid']?></td>
<td><a href="<?=$info['url']?>" title="<?=$info['title']?>"><!--<?=str_cut($info['title'],30)?>--><?=output::style($info['title'], $info['style'])?></a></td>
<!--<td><?=intval($info['hits'])?></td>-->
<td><a href="?module=member&action=view&userid=<?=$info['userid']?>"><?=$info['username']?></a></td>
<td><?=date('Y-m-d H:i', $info['updatetime'])?></td>
<td align="center">
<a href="?module=<?=$module?>&action=edit&catid=<?=$catid?>&contentid=<?=$info['contentid']?>">修改</a> | <a href="?module=<?=$module?>&action=cancel&catid=<?=$catid?>&contentid=<?=$info['contentid']?>">删除</a></td>
</tr>
<?php 
	}
}
?>
</table>
<div>
<span style="width:60px"><a href="###" onClick="javascript:$('input[type=checkbox]').attr('checked', true)">全选</a>/<a href="###" onClick="javascript:$('input[type=checkbox]').attr('checked', false)">取消</a></span>
		<input type="button" name="listorder" value=" 更新排序 " onClick="myform.action='?module=<?=$module?>&action=listorder&catid=<?=$catid?>&processid=<?=$processid?>&forward=<?=urlencode(URL)?>';myform.submit();"> 
		<input type="button" name="delete" value=" 批量删除 " onClick="myform.action='?module=<?=$module?>&action=cancel&catid=<?=$catid?>&processid=<?=$processid?>&forward=<?=urlencode(URL)?>';myform.submit();">
</div>
<div class="pages"><?=$c->pages?></div>
</form>
</body>
</html>